package com.schoolgard.entitybean;

import java.math.BigDecimal;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * TimeArray entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "TIME_ARRAY")
public class TimeArray implements java.io.Serializable {

	// Fields

	private String arrayno;
	private String t1;
	private String t2;
	private String t3;
	private String t4;
	private String t5;
	private String t6;
	private String t7;
	private BigDecimal sendflag;
	private BigDecimal ctrlid;
	private Boolean enable;
	private Set<StudentType> studentTypes = new HashSet<StudentType>(0);
	private Set<TimeArrayToDevice> timeArrayToDevices = new HashSet<TimeArrayToDevice>(
			0);

	// Constructors

	/** default constructor */
	public TimeArray() {
	}

	/** minimal constructor */
	public TimeArray(String arrayno) {
		this.arrayno = arrayno;
	}

	/** full constructor */
	public TimeArray(String arrayno, String t1, String t2, String t3,
			String t4, String t5, String t6, String t7, BigDecimal sendflag,
			BigDecimal ctrlid, Boolean enable, Set<StudentType> studentTypes,
			Set<TimeArrayToDevice> timeArrayToDevices) {
		this.arrayno = arrayno;
		this.t1 = t1;
		this.t2 = t2;
		this.t3 = t3;
		this.t4 = t4;
		this.t5 = t5;
		this.t6 = t6;
		this.t7 = t7;
		this.sendflag = sendflag;
		this.ctrlid = ctrlid;
		this.enable = enable;
		this.studentTypes = studentTypes;
		this.timeArrayToDevices = timeArrayToDevices;
	}

	// Property accessors
	@Id
	@Column(name = "ARRAYNO", unique = true, nullable = false, length = 16)
	public String getArrayno() {
		return this.arrayno;
	}

	public void setArrayno(String arrayno) {
		this.arrayno = arrayno;
	}

	@Column(name = "T1", length = 100)
	public String getT1() {
		return this.t1;
	}

	public void setT1(String t1) {
		this.t1 = t1;
	}

	@Column(name = "T2", length = 100)
	public String getT2() {
		return this.t2;
	}

	public void setT2(String t2) {
		this.t2 = t2;
	}

	@Column(name = "T3", length = 100)
	public String getT3() {
		return this.t3;
	}

	public void setT3(String t3) {
		this.t3 = t3;
	}

	@Column(name = "T4", length = 100)
	public String getT4() {
		return this.t4;
	}

	public void setT4(String t4) {
		this.t4 = t4;
	}

	@Column(name = "T5", length = 100)
	public String getT5() {
		return this.t5;
	}

	public void setT5(String t5) {
		this.t5 = t5;
	}

	@Column(name = "T6", length = 100)
	public String getT6() {
		return this.t6;
	}

	public void setT6(String t6) {
		this.t6 = t6;
	}

	@Column(name = "T7", length = 100)
	public String getT7() {
		return this.t7;
	}

	public void setT7(String t7) {
		this.t7 = t7;
	}

	@Column(name = "SENDFLAG", precision = 22, scale = 0)
	public BigDecimal getSendflag() {
		return this.sendflag;
	}

	public void setSendflag(BigDecimal sendflag) {
		this.sendflag = sendflag;
	}

	@Column(name = "CTRLID", precision = 22, scale = 0)
	public BigDecimal getCtrlid() {
		return this.ctrlid;
	}

	public void setCtrlid(BigDecimal ctrlid) {
		this.ctrlid = ctrlid;
	}

	@Column(name = "ENABLE", precision = 1, scale = 0)
	public Boolean getEnable() {
		return this.enable;
	}

	public void setEnable(Boolean enable) {
		this.enable = enable;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "timeArray")
	public Set<StudentType> getStudentTypes() {
		return this.studentTypes;
	}

	public void setStudentTypes(Set<StudentType> studentTypes) {
		this.studentTypes = studentTypes;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "timeArray")
	public Set<TimeArrayToDevice> getTimeArrayToDevices() {
		return this.timeArrayToDevices;
	}

	public void setTimeArrayToDevices(Set<TimeArrayToDevice> timeArrayToDevices) {
		this.timeArrayToDevices = timeArrayToDevices;
	}

}